<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="UTF-8">
		<title>背景颜色变化</title>
	</head>
	<body>
		<input type="button" value="点我吧">
		<p>我一会显示一会隐藏</p>
		<script src="js/jquery-1.8.3.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$("input").toggle(function() {
						$("body").css("background", "#ff0000");
					},
					function() {
						$("body").css("background", "#00ff00");
					},
					function() {
						$("body").css("background", "#0000ff");
					})
			});
		</script>
	</body>
</html>